package com.xxg.renrenorder.domain.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 分页查看订单参数
 *
 * @author xxg
 * @date 2020/10/30
 */
@Data
@ApiModel(value = "OrderListQuery", description = "分页查看所有订单参数")
public class OrderListQuery {
    @NotNull(message = "pageNo不能为null")
    @Min(value = 1, message = "pageNo的值不能小于1")
    @ApiModelProperty(value = "页码", required = true)
    private Integer pageNo;
    @NotNull(message = "pageSize不能为null")
    @Min(value = 1, message = "pageSize的值不能小于1")
    @Max(value = 100, message = "pageSize的值不能大于100")
    @ApiModelProperty(value = "页大小", required = true)
    private Integer pageSize;
    @ApiModelProperty(value = "1-待付款,2-待发货，3-待收货，null-全部")
    private List<Integer> orderStatus;
    @ApiModelProperty(value = "开始日期 yyyy-MM-dd HH:mm:ss")
    private String startDate;
    @ApiModelProperty(value = "结束日期 yyyy-MM-dd HH:mm:ss")
    private String endDate;
    @ApiModelProperty(value = "订单收件人姓名（模糊查询）")
    private String name;
    @ApiModelProperty(value = "订单收件人手机号（精确查询）")
    private String phone;
    @ApiModelProperty(value = "订单收件人地址所在行政区划代码（精确查询）")
    private Integer areaCode;
    @ApiModelProperty(value = "下订单用户的userId")
    private Integer userId;
    @ApiModelProperty(value = "下订单用户分组 3-厂家，4-经销商，5-高级经销商，6-实体店，7-高级实体店 null-全部")
    private List<Integer> groupId;
    @ApiModelProperty(value = "订单中某个商品名称")
    private String productName;
    @ApiModelProperty(value = "订单中某个商品所在店铺名称")
    private String shopName;
    @ApiModelProperty(value = "排序字段 时间-createTime")
    private String sortField;
    @ApiModelProperty(value = "排序规则 0-倒序，1-正序")
    private Integer sort;
    @ApiModelProperty(value = "订单类型 1-普通订单 2-带货订单")
    private Integer orderType;
}